﻿using SIG.Core;
using SIG.Resources.Admin;

namespace SIG.Model.Shipping
{
    public class RecipientInfo : AuditableEntity<int>
    {
        public RecipientInfo()
        {
            this.EntityName = EntityNames.RecipientInfo;
        }
        public int ProvinceId { get; set; }
        public Province Province { get; set; }
        public int? CityId { get; set; }
        public City City { get; set; }
        public int? DistrictId { get; set; }
        public District District { get; set; }
        public string  Address { get; set; }
        public string Postcode { get; set; }
        public string Recipient { get; set; }
        public string Mobile { get; set; }
        public string Phone { get; set; }
        public bool IsDefault { get; set; }

        public string ProvinceName {
            get {
                if (Province != null)
                    return Province.Name;
                return "";
            } }

        public string CityName
        {
            get
            {
                if (City != null)
                    return City.Name;
                return "";
            }
        }
        public string DistrictName
        {
            get
            {
                if (District != null)
                    return District.Name;
                return "";
            }
        }
    }
}
